#ifndef SDelegate_H
#define SDelegate_H

#include "Global_Signal.h"
#include "abstractDelegate.h"

template <class T>
class sDelegate1 : public AbstractDelegate
{
    public :

    int (*pDelegate)(T);            /*!< Prototype du pointeur de la fonction membre à exécuter  */

    T arg1;

    sDelegate1(int (*apDelegate)(T),T aArg1);

    virtual void Run();

    template<class T>
     virtual  void Run(T arg)=0;

    template<class T, class U>
     virtual  void Run(T arg, U arg2)=0;

    template<class T, class U, class W>
     virtual  void Run(T arg, U arg2, W arg3)=0;
};


template <class T>
sDelegate1<T>::sDelegate1(int (*apDelegate)(T),T aArg1)
{
        pDelegate=apDelegate;
        arg1=aArg1;
}


template <class T>
void sDelegate1<T>::Run()
{
    (*pDelegate)(arg1);
}
#endif // SDelegate_H
